<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
   
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>学生信息导入</title>

<style>
    body{font-family: 微软雅黑;}
	table{
		border:1px solid silver;
		border-collapse:collapse;
	}
	
	 th,td{
		border:1px solid silver;
		font-size:12px;
		word-break: keep-all;white-space:nowrap;
		height:22px;
	}
	
	input ,button{
		border:1px solid silver;
		font-size:12px;
	}
	
	 a{
	    text-decoration: none; 
	    color:black;
	 }

    a:hover{
	    	 text-decoration: none; 
	    	 font-weight:bold;
	    	 color:red;
	 }
	 
	 #div_import{
	 	margin:9px;
	 	font-size:13px;
	 }
	 
	  #div_import label{
	 	color:blue;
	 	font-weight: bold;
	 }
</style>

<script>
    var msg="${msg}";
    if(msg!=''){
    	alert(msg);
    }
	function importData(){
		if( confirm('确定要把数据导入到系统中吗') ){
			window.location.href="/student/imortToDB";
		}	
	}
	
	function cancleImport(){
		if( confirm('确定取消导入吗') ){
			window.location.href="/student/cancleImport";
		}	
	}
</script>
</head>
<body>
    <h3>学生管理 》导入学生信息</h3>
	<hr />
	
	<form action="/student/loadFromXls" method="post" enctype="multipart/form-data" >
		<input type="file" name="file1"   />  
		<input type="submit" value="确定">
	</form>
	
    <c:if test="${studentList!=null}">
  	
  	<div id="div_import">
		 共: <label>${fn:length(studentList)}</label> 条数据       &nbsp;  &nbsp;   <button onclick="importData()">确认导入</button>  <button onclick="cancleImport()" >取消导入</button>	
		${msg }
	</div>
	
	<table>
	
	  <tr>

	 	<th>学员编号</th>
	  	<th>姓名</th>
	  	<th>校招</th>
	  	<th>状态</th>
	  	<th>班级</th>
	  	<th>进班时间</th>
	  	<th>出班时间</th>
	  	<th>咨询</th>
	  	<th>立项学费</th>
	  	<th>培养方式</th>
	  	<th>学生档案</th>
	  	<th>照片</th>
	  	<th>学历证</th>
	  	<th>协议</th>
	  	<th>学员手册</th>
	  	<th>电话</th>
	  	<th>QQ</th>
	  	<th>毕业时间</th>
	  	<th>毕业学校</th>
	  	<th>学历</th>
	  	<th>专业</th>
	  	<th>语种</th>
	  	<th>外语级别</th>
	  	<th>其他证书</th>
	  	<th>身份证号</th>
	  	<th>出生日期</th>
	  	<th>年龄</th>
	  	<th>性别</th>
	  	<th>民族</th>
	  	<th>政治面貌</th>
	  	<th>户口所在地</th>
	  	<th>家庭住址</th>
	  	<th>家庭电话</th>
	  	<th>联系人一</th>
	  	<th>联系人一电话</th>
	  	<th>联系人二</th>
	  	<th>联系人二电话</th>
	  	<th>班主任分析</th>
	  </tr>
	  
	   <c:forEach var="stu" items="${studentList }" >
	    <tr>
	  	<td> ${stu.学员编号}</td> 
	  	<td> ${stu.姓名}</td>
	  	<td> ${stu.校招}</td>
	  	<td> ${stu.状态}</td>
	  	<td> ${stu.班级}</td>
	  	<td> <fmt:formatDate    value="${stu.进班时间}"  pattern="yyyy/MM/dd" /></td>
	  	<td> <fmt:formatDate    value="${stu.出班时间}"  pattern="yyyy/MM/dd" /> </td>
	  	<td> ${stu.咨询}</td>
	  	<td> ${stu.立项学费}</td>
	  	<td> ${stu.培养方式}</td>
	  	<td> ${stu.学生档案}</td>
	  	<td> ${stu.照片}</td>
	  	<td> ${stu.学历证}</td>
	  	<td> ${stu.协议}</td>
	  	<td> ${stu.学员手册}</td>
	  	<td> ${stu.电话}</td>
	  	<td> ${stu.QQ}</td>
	  	<td> <fmt:formatDate    value="${stu.毕业时间}"  pattern="yyyy/MM/dd" /> </td>
	  	<td> ${stu.毕业学校}</td>
	  	<td> ${stu.学历}</td>
	  	<td> ${stu.专业}</td>
	  	<td> ${stu.语种}</td>
	  	<td> ${stu.外语级别}</td>
	  	<td> ${stu.其他证书}</td>
	  	<td> ${stu.身份证号}</td>
	  	<td> <fmt:formatDate    value="${stu.出生日期}"  pattern="yyyy/MM/dd" /> </td>
	  	<td> ${stu.年龄}</td>
	  	<td> ${stu.性别}</td>
	  	<td> ${stu.民族}</td>
	  	<td> ${stu.政治面貌}</td>
	  	<td> ${stu.户口所在地}</td>
	  	<td> ${stu.家庭住址}</td>
	  	<td> ${stu.家庭电话}</td>
	  	<td> ${stu.联系人一}</td>
	  	<td> ${stu.联系人一电话}</td>
	  	<td> ${stu.联系人二}</td>
	  	<td> ${stu.联系人二电话}</td>
	  	<td> ${stu.班主任分析学员特点}</td>
	  </tr>
	   </c:forEach>
	  
	</table>
	 </c:if>

</body>
</html>